<template>
  <el-button
    type="primary"
    :icon="icon"
    class="tx-button-add"
    @click="click()"
    v-if="$showAuthElement()"
    >{{ name }}</el-button
  >
</template>

<script>
export default {
  props: {
    name: {
      type: String,
      default: "新增",
    },
    icon: {
      type: [String, Number],
      default: "el-icon-plus",
    },
  },

  methods: {
    click() {
      this.$emit("click");
    },
  },
};
</script>
<style lang="scss">
.tx-button-add {
  // width: 182px;
  // line-height: 32px;
  // height: 32px;
  background: #38c2c6;
  border: 1px solid #38c2c6;
  border-radius: 4px;
}
</style>
